//
//  StringDemo.cpp
//  CppDemo
//
//  Created by 蒋益杰 on 2017/4/8.
//  Copyright © 2017年 com.ed. All rights reserved.
//

#include "StringDemo.hpp"

#include <string>
#include <algorithm>
#include <vector>
#include <fstream>

using namespace std;

void readFile() {
    fstream in("/Users/edison/Desktop/name.txt");
    string strtmp;
    vector<string> vect;
    
    while (getline(in, strtmp, '\n')) {
        vect.push_back(strtmp.substr());
    }
    sort(vect.begin(), vect.end());
    vector<string>::iterator it = unique(vect.begin(), vect.end());
    copy(vect.begin(), it, ostream_iterator<string>(cout, "\n"));
    
    
}
